﻿namespace Agile.Shared.WebApi.Extensions;

public static class ControllerBaseExtension
{
    public static T GetService<T>(this ControllerBase @this) => @this.HttpContext.RequestServices.GetService<T>() ?? throw new Exception($"未获取到对象{typeof(T).Name}的实例"); 
}
